﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using KSTools.Controls;

namespace KSTools.Forms
{
    public partial class FrmMain : Form
    {
        private MenuPanel mpToolList { get; set; }

        public FrmMain()
        {
            InitializeComponent();
        }

        private void menuHelp_About_Click(object sender, EventArgs e)
        {
            Form frm = new Form();
            frm.Text = "Form1";
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
            TabPage tpForm = new TabPage();
            tpForm.Tag = "Form1";
            tpForm.Text = "Form1";
            
            this.tabWindows.TabPages.Add(tpForm);
            tabWindows.TabIndex = 0;
        }

        private void toolStripButtonToolList_Click(object sender, EventArgs e)
        {
            if (this.toolStripButtonToolList.Text == "显示工具列表")
            {
                if (this.mpToolList == null)
                {
                    this.mpToolList = new MenuPanel();
                    this.mpToolList.mdiParent = this;
                }
                this.mpToolList.Show();
                this.toolStripButtonToolList.Text = "隐藏工具列表";
            }
            else 
            {
                this.mpToolList.Hide();
                this.toolStripButtonToolList.Text = "显示工具列表";
            }
        }

        


    }
}
